﻿using Microsoft.TeamFoundation.WorkItemTracking.Client;

namespace VisualWip.TFS2010Providers
{
    public class QueryFolderViewModel : QueryItemViewModel
    {

        public QueryFolderViewModel(QueryFolder queryFolder, QueryFolderViewModel parent)
            : base(queryFolder,parent)
        {
            foreach (QueryItem item in queryFolder)
            {
                if (item is QueryFolder)
                {
                    Children.Add(new QueryFolderViewModel(item as QueryFolder,this));
                }
                else if (item is QueryDefinition)
                {
                    Children.Add(new QueryDefinitionViewModel(item as QueryDefinition,this));
                }
            }
        }
    }

}